Replace which by POSIX command -v (#829)
authorJochen Sprickerhof <git@jochen.sprickerhof.de>
Mon, 24 Jan 2022 14:33:01 +0000 (15:33 +0100)
committerGitHub <noreply@github.com>
Mon, 24 Jan 2022 14:33:01 +0000 (07:33 -0700)
testo
testo.d/kml.test
tools/Dockerfile_f32
tools/Dockerfile_f33
tools/Dockerfile_f34
tools/Dockerfile_f35
tools/nuke_format
vtesto

diff --git a/testo b/testo
index 7ce64da08950fb2ce19e32eb5bbdceaa46ab5a4c..b5e38ab3599f87b33518cd8ce59b14ccc861a2ab 100755 (executable)
--- a/testo
+++ b/testo
@@ -111,7 +111,7 @@ utf8bomcheck()
 xmlwfcheck()
 {
   if [ -z "${VALGRIND}" ]; then
-    if which ${XMLWF} >/dev/null 2>&1; then
+    if command -v ${XMLWF} >/dev/null 2>&1; then
       # xmlwf is a bit lame, exit status is always 0
       rm -f ${TMPDIR}/xmlwf.out
       ${XMLWF} $1 2>&1 | tee ${TMPDIR}/xmlwf.out
@@ -173,7 +173,7 @@ if [ -z "${VALGRIND}" ]; then
 fi
 
 if [ -z "${VALGRIND}" ]; then
-  if which ${XMLWF} >/dev/null 2>&1; then
+  if command -v ${XMLWF} >/dev/null 2>&1; then
     echo "Running well-formed XML test"
     for i in ${XMLS}
     do
index 2863b86bdc321ba909e0f2d2b4fa4cbcdc85b8b4..0faafe7b5fe76d267de7959192b0c5b0625aed2c 100644 (file)
@@ -71,7 +71,7 @@ compare ${REFERENCE}/realtime.kml ${TMPDIR}/realtime.kml
 
 if [ "${RUNNINGVALGRIND}" != "0" ]; then
   set -e
-  if which xmllint > /dev/null;
+  if command -v xmllint > /dev/null;
   then
     KMLS=$(find ${REFERENCE} -name \*.kml)
     for f in $KMLS
index b77f242f8ea3cf9a81a461562e85f3b0953053c2..9a775a7d03bedca1c9220d01a6f51b09efc3e4d1 100644 (file)
@@ -7,7 +7,7 @@ LABEL maintainer="https://github.com/tsteven4"
 WORKDIR /app
 
 # basic tools to build
-RUN dnf install --assumeyes git make valgrind diffutils which findutils langpacks-en && \
+RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en && \
     dnf clean all
 # libraries used by gpsbabel.  zlib and shapelib may or may not be used depending qmake options.
 RUN dnf install --assumeyes libusbx-devel zlib-devel shapelib-devel && \
index 75cf4f945b2c5d2acaddfb89184a414a755c88c2..d254cf4915381158ab8f469b29f10d75d352ade4 100644 (file)
@@ -7,7 +7,7 @@ LABEL maintainer="https://github.com/tsteven4"
 WORKDIR /app
 
 # basic tools to build
-RUN dnf install --assumeyes git make valgrind diffutils which findutils langpacks-en && \
+RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en && \
     dnf clean all
 # libraries used by gpsbabel.  zlib and shapelib may or may not be used depending qmake options.
 RUN dnf install --assumeyes libusbx-devel zlib-devel shapelib-devel && \
index 54350eec6d97c3a3f0e5da6b928a25243d9b8e25..353168c8c10690584ea3090b1f2dcbf13eb5f1b9 100644 (file)
@@ -7,7 +7,7 @@ LABEL maintainer="https://github.com/tsteven4"
 WORKDIR /app
 
 # basic tools to build
-RUN dnf install --assumeyes git make valgrind diffutils which findutils langpacks-en && \
+RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en && \
     dnf clean all
 # libraries used by gpsbabel.  zlib and shapelib may or may not be used depending qmake options.
 RUN dnf install --assumeyes libusbx-devel zlib-devel shapelib-devel && \
index 2ba2d788353afb83f8958ad4386f008730e71d74..6561ca0fb38f89707415c2ae500fff401994febc 100644 (file)
@@ -7,7 +7,7 @@ LABEL maintainer="https://github.com/tsteven4"
 WORKDIR /app
 
 # basic tools to build
-RUN dnf install --assumeyes git make valgrind diffutils which findutils langpacks-en && \
+RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en && \
     dnf clean all
 # libraries used by gpsbabel.  zlib and shapelib may or may not be used depending qmake options.
 RUN dnf install --assumeyes libusb1-devel zlib-devel shapelib-devel && \
index 11097a6e2ac3a3fbdd03c0c4543569403ff8faaf..e0d4c952ab7e381c4f6a7e4869067498dbca6fd2 100755 (executable)
@@ -1,6 +1,6 @@
 # usage nuke_format format_name
 
-SED=$(which gsed)
+SED=$(command -v gsed)
 EDITOR="${EDITOR:-vim}"
 
 # $1 = format $2 = file in all functions
diff --git a/vtesto b/vtesto
index 0debc413db217659d72c56c990c8bd48a4bf1881..46a6b66713a78829084ee45900c5b1dffaf6cd1a 100755 (executable)
--- a/vtesto
+++ b/vtesto
@@ -11,7 +11,7 @@ vg_version_warning() {
   echo "If you get \"unhandled instruction bytes: 0xF 0xC7\" warnings from" 1>&2
   echo "valgrind your valgrind is too old." 1>&2
   echo "valgrind 3.13.0 and later should not have this problem." 1>&2
-  echo "$(which valgrind) is $(valgrind --version)" 1>&2
+  echo "$(command -v valgrind) is $(valgrind --version)" 1>&2
   echo "" 1>&2
 }